#ifndef clox_vm_h
#define clox_vm_H

#include "byte_code.h"
#include "stack.h"

#define VM_FRAME_MAX_COUNT 256

typedef struct {
    int ip;
    Chunk* chunk;
    Stack stack;
    HashTable global;
    CallFrame* frames;
    int currentFrameIdx;
} VM;

void vmInit(VM* vm, ObjFunction* fun);
void run(VM* vm);

#endif